package com.choudou5.solr.framework.constants;

/**
 * @Name：ErrorResp
 * @Author：choudou5
 * @Date：2018-07-14
 */
public enum ErrorResp {

    //https://www.cnblogs.com/jianying/p/7992622.html

    UN_LOGIN(1001, "未登录，请先登录！"),
    INVALID_PARAM(1002, "请求参数无效！"),
    Bad_Request(400, "语义有误，当前请求无法被服务器理解！"),
    Forbidden(403, "您的权限不足，请联系管理员！", "/pub/error403.jsp"),
    Not_Found(404, "请求失败，系统找不到该请求！", "/pub/error404.jsp"),
    Not_Method_Allowed(405, "请求方式不支持！", "/pub/error405.jsp"),
    Error(500, "系统出了点问题，请联系管理员！"),
    Bad_Gateway(502, "网络有误，请联系管理员！"),
    Gateway_Timeout(504, "网络超时，请联系管理员！"),
    Block_Access(4036, "您的访问频率太高，IP地址被拒绝，请10秒后再试！"),
    Block_Login(4037, "您的手机号登录失败次数太多，请稍后再试！"),
    ;

    ErrorResp(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    ErrorResp(int code, String desc, String page) {
        this.code = code;
        this.desc = desc;
        this.page = page;
    }

    private int code;
    private String desc;
    private String page;

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public String getPage() {
        return page;
    }

}
